<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>
    class Parent{
        constructor(m){
            this.msg = m;
        }
        show(){
            console.log(this.msg);
        }
    }

    class Child extends Parent{
        constructor(m){
            super(m);
        }
        show(){
            console.log("哈哈哈");
        }
    }

    const p = new Parent("hello");
    console.log(p);
    p.show();

    const c = new Child("world");
    console.log(c);
    c.show();

    
    // 类
    // 父类，子类
    // 父类是子类的超类


</script>
</html>